package br.edu.ifrn.servlets;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@SuppressWarnings("serial")
public class Logout extends HttpServlet {
       
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		HttpSession sessao = req.getSession();
		sessao.removeAttribute("aluno");
		sessao.removeAttribute("egresso");
		sessao.removeAttribute("convenio");
		sessao.removeAttribute("admin");
		sessao.removeAttribute("erro");
		RequestDispatcher jsp = req.getRequestDispatcher("index.html");
		jsp.forward(req, resp);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	}

}
